<template>
  <div>
    <h1>888</h1>
    <button @click="back">后退</button>
    <button @click="forward">前进</button>
    <button @click="go">go</button>
  </div>

</template>

<script>
export default {
  name: "Banner",
  methods:{
    back(){
      this.$router.back()//back 后退
    },
    forward(){
      this.$router.forward()//forward 前进
    },
    go(){
      this.$router.go(-2)//连续后退 2
      //this.$router.go(2)//连续前进 2
    }
  }
}
</script>

<style scoped>

</style>